<?php
/**
 * Created by PhpStorm.
 * User: m1514
 * Date: 2017/1/6
 * Time: 9:47
 */

namespace Home\Controller;


use Common\Model\RegModel;

class RegController extends HomeQController
{
    public function index(){

        if(IS_POST){
            $data=(new RegModel());
            if($data->index()){
                $this->success('注册成功',u('Login/index'));die;
            }else{
                $this->error($data->getError(),'index');
            }
        }
        //显示模板
        $this->display();
    }
}